package com.lm.upms.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lm.upms.api.entity.SysOperLog;
import com.lm.upms.mapper.SysOperLogMapper;
import com.lm.upms.service.SysOperLogService;
import org.springframework.stereotype.Service;

/**
 * 系统操作日志
 *
 * @author lm
 * @date 2019/7/8 17:02
 */
@Service
public class SysOperLogServiceImpl extends ServiceImpl<SysOperLogMapper, SysOperLog> implements SysOperLogService {

    /**
     * 批量插入前端错误日志
     *
     * @param preLogVoList 日志信息
     * @return
     */
//    @Override
//    public Boolean saveBatchLogs(List<PreLogVo> preLogVoList) {
//        List<SysLog> sysLogs = preLogVoList.stream()
//                .map(pre -> {
//                    SysLog log = new SysLog();
//                    log.setType(CommonConstants.STATUS_LOCK);
//                    log.setTitle(pre.getInfo());
//                    log.setException(pre.getStack());
//                    log.setParams(pre.getMessage());
//                    log.setCreateTime(LocalDateTime.now());
//                    log.setRequestUri(pre.getUrl());
//                    log.setCreateBy(pre.getUser());
//                    return log;
//                })
//                .collect(Collectors.toList());
//        return this.saveBatch(sysLogs);
//    }

}